package com.jk.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jk.dao.SysDictDataMapper;
import com.jk.dto.SysDictData;
import com.jk.service.SysDictDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author yzf
 * @version 1.0
 * @description: TODO
 * @date 2024/12/11 17:21
 */
@Service
public class SysDictDataServiceImpl implements SysDictDataService {
    @Autowired
    private SysDictDataMapper sysDictDataMapper;
    @Override
    public List<SysDictData> findSysDictBySex(String type) {
        QueryWrapper<SysDictData> query = new QueryWrapper<>();
        if (null != type && !"".equals(type)) {
            query.eq("dict_type", type);
        }
        return sysDictDataMapper.selectList(query);
    }
    @Override
    public List<SysDictData> findSysDictByStatus() {
        return sysDictDataMapper.findSysDictByStatus();
    }
}
